<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title>评价</title>
		<link rel="stylesheet" href="../../../static/wx/css/style.css" />
		<script type="text/javascript" src="../../../static/wx/js/lib/rem.js"></script>
	</head>

	<body class="bf">
		<div id="wrap">
			<div class="wrap_star">
				<div class="wrap_star_img">
					<img src="../../../static/wx/img/star_default_icon.png" />
					<img src="../../../static/wx/img/star_default_icon.png" />
					<img src="../../../static/wx/img/star_default_icon.png" />
					<img src="../../../static/wx/img/star_default_icon.png" />
					<img src="../../../static/wx/img/star_default_icon.png" />
				</div>
				<div class="prompt">您对本次服务满意吗</div>
				<ul class="wrap_star_text clearfix">

				</ul>
			</div>

			<div class="wrap_btn none">
				<a href="javascript:void(0)" class="button" id="submit_btn">提交</a>
			</div>
			
			<div class="msg-succ">
				<img src="../../../static/wx/img/succ_icon.png" /> <span class="f20">提交成功</span> 
			</div>
		</div>
		<script type="text/javascript" src="../../../static/wx/js/lib/jquery-3.3.1.min.js"></script>
		<script type="text/javascript">
			var label=[];
			var htmlStr = "";
			var evaluateVo = {bId: "28478689535437495780082801547", label: "货质优良,回收有频率", orderId: "201812031827139391013923", score: "3", sendUserId: "28444765309003157247057352550"}
			var score=evaluateVo.score;
			var prompt = ['非常不满意 ，各方面都很差', '不满意 ，比较差', '一般，还需改善', '比较满意 ，仍可改善', '非常满意 ']; //评价提示语
			
			$(".prompt").html(prompt[score-1]);
			
			$('img').each(function(index) {
				var star = '../../../static/wx/img/star_default_icon.png'; //普通灰色星星图片的存储路径
				var starRed = '../../../static/wx/img/star_selected_icon.png'; //红色星星图片存储路径
				this.id = index; //遍历img元素，设置单独的id
				
				if(index<score){
					$(this).attr('src', starRed);
				}
			});

		   var label = evaluateVo.label.split(",");
		   
		    for (var i = 0; i < label.length; i++) {

              htmlStr += '<li class="on">'+label[i]+'</li>';
   
            }
		    
		    $(".wrap_star_text").append(htmlStr);
			
		
		</script>
	</body>

</html>